package com.lagou.module2.task3.card;

/**
 * 手机卡类
 */
public class SIMCard {

    // 手机卡类特征，定义成员变量
    private typeEnum cardType; // 卡类型
    private String cardNumber;  // 卡号
    private String userName; // 用户名
    private String password; // 密码
    private int accountBalance; // 账户余额
    private int callDuration; //通话时长(分钟)
    private int mobileInternetData; //上网流量


    public SIMCard() {
    }
    public SIMCard(String cardNumber, String userName, int accountBalance){
        setCardNumber(cardNumber);
        setUserName(userName);
        setAccountBalance(accountBalance);
    }
    public SIMCard(typeEnum cardType, String cardNumber, String userName, String password,
                   int accountBalance, int callDuration, int mobileInternetData){
        setCardType(cardType);
        setCardNumber(cardNumber);
        setUserName(userName);
        setPassword(password);
        setAccountBalance(accountBalance);
        setCallDuration(callDuration);
        setMobileInternetData(mobileInternetData);
    }

    public typeEnum getCardType() {
        return cardType;
    }

    public void setCardType(typeEnum cardType) {
        this.cardType = cardType;
    }

    public String getCardNumber() {
        return cardNumber;
    }

    public void setCardNumber(String cardNumber) {
        this.cardNumber = cardNumber;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public int getAccountBalance() {
        return accountBalance;
    }

    public void setAccountBalance(int accountBalance) {
        this.accountBalance = accountBalance;
    }

    public int getCallDuration() {
        return callDuration;
    }

    public void setCallDuration(int callDuration) {
        this.callDuration = callDuration;
    }

    public int getMobileInternetData() {
        return mobileInternetData;
    }

    public void setMobileInternetData(int mobileInternetData) {
        this.mobileInternetData = mobileInternetData;
    }

    // 行为：显示（卡号 + 用户名 + 当前余额）
    public void show(){
        System.out.println("卡号：" + getCardNumber() + "，用户名；" + getUserName() + "，当前余额：" + getAccountBalance());
    }

}
